package com.tyust.lawyermanager.dongao.service;

import com.tyust.lawyermanager.dongao.entity.Lawyer;
import com.tyust.lawyermanager.dongao.mapper.LawyerMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 律师业务接口实现类
 */
@Service
public class LawyerServiceImpl implements LawyerService {
    @Autowired
    LawyerMapper lawyerMapper;

    @Override
    public int removeLawyer(int lawyerid) {
        return lawyerMapper.deleteLawyer(lawyerid);
    }

    @Override
    public int addLawyer(Lawyer lawyer) {
        return lawyerMapper.insertLawyer(lawyer);
    }

    /**
     * 查询所有律师
     *
     * @return
     */
    @Override
    public List<Lawyer> findLawyer() {
        return lawyerMapper.selectLawyer();
    }
}
